object demo1 {

  def main(args: Array[String]): Unit = {
    val p1 = new Pointts(2,3)
    val p2 = new Pointts(2,4)
    val p3 = new Pointts(3,3)
    println(p1.isNotEquall(p2))
    println(p1.isNotEquall(p3))
    println(p1.isNotEquall(2))
  }
}

trait Equall {
  def isEquall(x:Any):Boolean
  def isNotEquall(x:Any):Boolean = !isEquall(x)
}

class Pointts(xc: Int, yc: Int) extends Equall {
  var x: Int = xc
  var y: Int = yc

  def isEquall(obj:Any) = obj.isInstanceOf[Pointts] && obj.asInstanceOf[Pointts].x == x

}
